var express = require('express');
var router = express.Router();
var AV=require('leancloud-storage');

/* GET home page. */
router.get('/', function(req, res, next) {
	//var Coupons = AV.Object.extend('Coupons');
	var query=new AV.Query('Coupons');
	query.include('picture');
	query.find().then(function(results){
		
		res.render('index', {list: results});
	},function(error){
		console.dir(error);
	})
});



module.exports = router;
